package com.thesis.service.impl;

import com.thesis.dao.SysAdminMapper;
import com.thesis.entity.SysAdmin;
import com.thesis.service.AdminService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Anvy at 2020/3/10.
 */
@Service("adminService")
public class AdminServiceImpl implements AdminService {
    
    @Autowired
    private SysAdminMapper adminMapper;
    
    @Override
    public int deleteByPrimaryKey(Long id) {
        return adminMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysAdmin record) {
        return adminMapper.insert(record);
    }

    @Override
    public int insertSelective(SysAdmin record) {
        return adminMapper.insertSelective(record);
    }

    @Override
    public SysAdmin selectByPrimaryKey(Long id) {
        return adminMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysAdmin record) {
            return adminMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysAdmin record) {
        return adminMapper.updateByPrimaryKey(record);
    }

    @Override
    public Page<SysAdmin> findPageList(SysAdmin record) {
        return adminMapper.findPageList(record);
    }

    @Override
    public Page<SysAdmin> findPageListByVague(SysAdmin queryParam, String vagueParam) {
        return adminMapper.findPageListByVague(queryParam,vagueParam);
    }

    @Override
    public Integer deleteBatchByIds(List<Integer> idList) {
        return adminMapper.deleteBatchByIds(idList);
    }

    @Override
    public List<SysAdmin> checkObj(SysAdmin record) {
        return adminMapper.checkObj(record);
    }

    @Override
    public SysAdmin findByMobile(String mobile) {
        return adminMapper.findByMobile(mobile);
    }
}
